<?php

namespace app\api\controller;

use app\common\controller\Api;
use app\admin\model\Banner;
use app\common\model\GoodsCategory as MyModel;
/**
 * 分类接口
 */
class Goodscategory extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $this->success('请求成功');
    }
    /*
     * 商品分类 列表
     * */
    public function GoodsCategoryList(){
        $type = input('types',0);
        $pid = input('pid',0);
        $where['status'] = 'normal';
        $where['types']  = $type;
        $where['pid']    = $pid;
        $list = MyModel::where($where)->order('weigh asc')->select();
        $this->success('成功',$list);
    }

}
